Conditions | 1 |
Paths | 2 |
Total Lines | 17 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | /** |
||
36 | find: function(query) { |
||
37 | var matches = []; |
||
38 | |||
39 | this.$fields.each(function(){ |
||
40 | var $field = $(this), |
||
41 | title = $field.attr('data-title').toLowerCase(), |
||
42 | description = $field.find('.description').text(); |
||
43 | |||
44 | // Check query against the field's title |
||
45 | if(title.match(query) || description.match(query)){ |
||
46 | matches.push($field); |
||
47 | } |
||
48 | }); |
||
49 | |||
50 | // Convert the matches array to a jQuery |
||
51 | return $(matches).map(function(){return this.toArray();}); |
||
52 | } |
||
53 | }; |
This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.
To learn more about declaring variables in Javascript, see the MDN.